Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
parallax-controller
Advanced tools
[![npm version](https://badge.fury.io/js/parallax-controller.svg)](https://badge.fury.io/js/parallax-controller) [![codecov](https://codecov.io/gh/jscottsmith/parallax-controller/branch/master/graph/badge.svg)](https://codecov.io/gh/jscottsmith/parallax-c
Core classes and controller for creating parallax scrolling effects.
This package was created for react-scroll-parallax, but can be used as a standalone lib.
Create the parallax controller first:
const controller = ParallaxController.init();
Then create an element with animation effects as props:
controller.createElement({
elOuter: document.getElementById('outer'),
elInner: document.getElementById('inner'),
props: {
translateY: [-100, 100],
opacity: [0.4, 1],
},
});
<div id="outer">
<div id="inner">
<!-- children -->
</div>
</div>
A number of techniques are used to keep scrolling optimized:
getBoundingClientRect()
) are cached and only updated when layout may change.requestAnimationFrame
is used to apply all scroll effects.transform
and opacity
are allowed.will-change
is added to an element based on animation effects to prevent paints.If you have ideas to further optimize scrolling please PR or post an issue.
It's up to you to make sure you use this package appropriately. Here's some suggestions for usage while maintaining good UX:
FAQs
Core classes and controller for creating parallax scrolling effects
The npm package parallax-controller receives a total of 31,770 weekly downloads. As such, parallax-controller popularity was classified as popular.
We found that parallax-controller demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.